package br.com.expositor.apresentacao.administracao.componente.modalWindow;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

public abstract class ExModalWindow extends ModalWindow {
	public ExModalWindow(String id) {
		super(id);

		// Set sizes of this ModalWindow. You can also do this from the HomePage
		// but its not a bad idea to set some good default values.
		this.setInitialWidth(450);
		this.setInitialHeight(300);

		this.setTitle("Select something");

		// Set the content panel, implementing the abstract methods
		this.setContent(new ConfirmContentPanel(this.getContentId()) {
			@Override
			void onCancel(AjaxRequestTarget target) {
				ExModalWindow.this.onCancel(target);
			}
		});
	}

	public abstract void onCancel(AjaxRequestTarget target);

}
